echo "" >test.log
while true; do
    ark run $1 2>&1 | tee -a test.log
    last_line=$(tail -n 1 test.log)
    if [[ "$last_line" != *"PASSED"* ]]; then
        exit 1
    fi
    rm PGOProfilerTest*.xml
done
